<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
    </head>
    <script src="/Public/js/jquery.min.js"></script>
    <body>
    
    <span style='color:#CDCD00'>亲爱的用户：<?php echo (session('user')); ?></span><br>
     <form action="<?php echo U('qiandao');?>" method="post">
     <input type="hidden" name='uid' value="<?php echo (session('id')); ?>" />
     <input type="submit" value="签到" />
     </form>
    积分：<span id='jifen'><?php echo ($data["jifen"]); ?></span>
<br>
     兑换商品：<br>
     iPhone x 100积分<a href="/index.php/Home/Text/duihuan/sid/1/jifen/100">兑换</a><br>
     iPhone 7p 200积分<a href="/index.php/Home/Text/duihuan/sid/2/jifen/200">兑换</a><br>
     iPhone 7 300积分<a href="/index.php/Home/Text/duihuan/sid/3/jifen/300">兑换</a><br>
   <!--  <input type="button" value="ajax" id="ajax" /> -->
<!--     <span>积分：<?php echo ($data); ?></span> -->
我兑换过的商品：<br>
<?php if(is_array($wodeduihuan)): $i = 0; $__LIST__ = $wodeduihuan;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vol): $mod = ($i % 2 );++$i;?><hr>
    商品名称：<?php if($vol["sid"] = 1): ?>iPhone x
                <?php elseif($vol["sid"] = 2): ?>iPhone 7p
                <?php elseif($vol["sid"] = 3): ?>iPhone 7<?php endif; ?><br>
    消耗积分：<?php echo ($vol["xiaohaojifen"]); ?><br>
    <hr><?php endforeach; endif; else: echo "" ;endif; ?>
    <script type="text/javascript">
        $('#ajax').click(function(){
            $.post('/index.php/Home/Text/ajax', function(aaa) {
               $('#jifen').html(aaa);
            });
        });
    </script>
    </body>
</html>